-
Notifications
You must be signed in to change notification settings - Fork 249
feat: Add bash script to build and run fuzz testing #2686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2686 +/- ##
============================================
+ Coverage 56.12% 59.30% +3.17%
- Complexity 976 1436 +460
============================================
Files 119 147 +28
Lines 11743 13796 +2053
Branches 2251 2369 +118
============================================
+ Hits 6591 8182 +1591
- Misses 4012 4388 +376
- Partials 1140 1226 +86 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This is awesome ! @manuzhang |
|
|
||
| if [ ! -f "${COMET_SPARK_JAR}" ]; then | ||
| echo "Building Comet Spark jar..." | ||
| cd .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also be building native code here ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm following instructions in README to run mvn install -DskipTests at the root level. Which flag is also needed?
| # | ||
|
|
||
| set -eu | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may want to add some logic to detect the current working directory.
At the moment this script assumes that it is called with ./run.sh but some user may try to run it from the parent folder with ./fuzz-testing/run.sh.
|
|
||
| SPARK_MASTER="${SPARK_MASTER:-local[*]}" | ||
| PROJECT_VERSION="$(mvn -q help:evaluate -Dexpression=project.version -DforceStdout)" | ||
| COMET_SPARK_JAR="../spark/target/$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)-${PROJECT_VERSION}.jar" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cleaner and easier to debug (with set -x) if you extract the sub-shell commands and assign their results to their own variables.
E.g.
SPARK_ARTIFACT_ID="$(mvn -f ../spark/pom.xml -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
FUZZ_ARTIFACT_ID="$(mvn -q help:evaluate -Dexpression=project.artifactId -DforceStdout)"
COMET_SPARK_JAR="../spark/target/${SPARK_ARTIFACT_ID}-${PROJECT_VERSION}.jar"
COMET_FUZZ_JAR="target/${FUZZ_ARTIFACT_ID}-${PROJECT_VERSION}-jar-with-dependencies.jar"
| echo "Building Comet Spark jar..." | ||
| cd .. | ||
| mvn install -DskipTests | ||
| cd fuzz-testing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can avoid navigating the folders with cd by using mvn -f ../pom.xml ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be done once #2691 is in.
Which issue does this PR close?
Closes #2685.
Rationale for this change
What changes are included in this PR?
How are these changes tested?